/**
 * Created by yijx on 2017/5/24.
 */
angular.module('PrintService')
    .directive('upDownIcon', function () {
        return {
            restrict:'E',
            scope: {
                isUp: '=',
                onOperate:'&'
            },
            replace: true,
            template:
            '<div ng-click="onClick()">' +
            '<div ng-if="isUp">' +
                '<i class="	glyphicon glyphicon-chevron-up"></i>' +
            '</div>' +
            '<div ng-if="!isUp">' +
                '<i class="	glyphicon glyphicon-chevron-down"></i>' +
            '</div>' +
            '</div>',
            controller:['$scope',function ($scope) {
                $scope.onClick = function () {
                    $scope.isUp = !$scope.isUp;
                };
            }]
        };
    });
